From 08fa78d32c5565f34b7389697aee888e2f3c627d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 23 Dec 2007 18:08:38 +0000 Subject: [PATCH] (copy-face): Create the new face explicitly if it does not exist already. --- lisp/faces.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/faces.el b/lisp/faces.el index ceadb6f764f..a1b069e9ba6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -158,13 +158,18 @@ and for each existing frame. If the optional fourth argument NEW-FRAME is given, copy the information from face OLD-FACE on frame FRAME -to NEW-FACE on frame NEW-FRAME." +to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." (let ((inhibit-quit t)) (if (null frame) (progn + (when new-frame + (error "Copying face %s from all frames to one frame" + old-face)) + (make-empty-face new-face) (dolist (frame (frame-list)) (copy-face old-face new-face frame)) (copy-face old-face new-face t)) + (make-empty-face new-face) (internal-copy-lisp-face old-face new-face frame new-frame)) new-face)) -- 2.30.2